/*
 *Object_class.cpp
 *Create by Administrator
 * 2017年3月23日
 * 下午12:02:47
 * http://www.runoob.com/cplusplus/cpp-classes-objects.html
 * 学习
 * C++ 类和对象
 *
 */
#include <iostream>

using std::cout;
using std::endl;
class Box {
public:
	double length; //长度
	double breadth; //宽度
	double height; //高度
};

int main() {
	Box box1; //声明Box1 类型
	Box box2;
	double volume = 0.0;

	//box1
	box1.height = 5.0;
	box1.length = 6.0;
	box1.breadth = 7.0;

	//box2详述
	box2.height = 10.0;
	box2.length = 12.0;
	box2.breadth = 13.0;

	// Box的体积

	volume = box1.breadth * box1.height * box1.length;
	cout << "Box1 的体积 :" << volume << endl;
	volume = box2.breadth * box2.height * box2.length;

	cout << " Box2 的体积： " << volume << endl;
	return 0;
}

